package com.ffzl.cloud.http.response;

import android.os.Parcel;
import android.os.Parcelable;

/**
 *    author : Android 轮子哥
 *    github : https://github.com/getActivity/AndroidProject
 *    time   : 2019/12/07
 *    desc   : 用户信息
 */
public final class UserInfoBean implements Parcelable {
    private String name;
    private String name2;

    public String getName() {
        return name == null ? "" : name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName2() {
        return name2 == null ? "" : name2;
    }

    public void setName2(String name2) {
        this.name2 = name2;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.name2);
    }

    public void readFromParcel(Parcel source) {
        this.name = source.readString();
        this.name2 = source.readString();
    }

    public UserInfoBean() {
    }

    public UserInfoBean(String name, String name2) {
        this.name = name;
        this.name2 = name2;
    }

    protected UserInfoBean(Parcel in) {
        this.name = in.readString();
        this.name2 = in.readString();
    }

    public static final Parcelable.Creator<UserInfoBean> CREATOR = new Parcelable.Creator<UserInfoBean>() {
        @Override
        public UserInfoBean createFromParcel(Parcel source) {
            return new UserInfoBean(source);
        }

        @Override
        public UserInfoBean[] newArray(int size) {
            return new UserInfoBean[size];
        }
    };

    @Override
    public String toString() {
        return "UserInfoBean{" +
                "name='" + name + '\'' +
                ", name2='" + name2 + '\'' +
                '}';
    }
}